Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


FocusAcquired

The FocusAcquired method is called to notify this part that one of its display frames has acquired the specified focus.

void FocusAcquired (in ODTypeToken focus, 
                    in ODFrame ownerFrame);
focus
A tokenized string representing the focus type to be acquired, expressed as a 32-bit value.
ownerFrame
A reference to the display frame that has acquired the focus.
DISCUSSION
The focus parameter must be the tokenized form of one of the focus constants (kODClipboardFocus, kODKeyFocus, kODMenuFocus, kODModalFocus, kODMouseFocus, kODScrollingFocus, or kODSelectionFocus) or the tokenized form of a part-specific focus type. You can call the session object's Tokenize method to obtain a token corresponding to one of these constants.

OpenDoc calls this method to notify this part that the ownership of a focus has been transferred to it. For example, if a containing part uses the arbitrator's TransferFocus method to transfer a focus directly from one embedded part to another, the focus module calls the destination part's FocusAcquired method.

Your part's FocusAcquired method is not called when this part requests a focus or focus set using the arbitrator's RequestFocus and RequestFocusSet methods.

Your part's FocusAcquired method should perform any actions necessary to indicate that it has acquired the focus. For example, acquiring the selection focus might cause your part to highlight its selection.

OVERRIDING
When you subclass ODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrInvalidFrame
The specified frame is not a display frame of this part.
SEE ALSO
The ODFocusType type (page 889).
The ODTypeToken type (page 877).
The ODPart::FocusLost method (page 518).
The ODSession::Tokenize method (page 622).
"The FocusAcquired Method" on page 93 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Transferring Focus Without Negotiation" on page 209 in OpenDoc Programmer's Guide.
"On Frame Activation" on page 211 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help